home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / IPFlakeWay / Squelch Module / source / NatDNS.h < prev    next >
Text File  |  2000-06-23  |  1KB  |  39 lines

  1. // =================================================================================
  2. //    NatDNS.h                     ©2000 Sustainable Softworks. All rights reserved.
  3. // =================================================================================
  4. //    Network Address Translation DNS querries.
  5. //    Block FAKE domain names of the form
  6. //    <real-name>.dialing-please-wait-
  7.  
  8. #ifndef _H_NatDNS
  9. #define _H_NatDNS
  10. #pragma once
  11.  
  12. // dns protocol ports
  13. #define kDNSServerPort    53
  14.  
  15. // Generic message descriptor
  16. struct msg_descriptor {
  17.     UInt8*    data;    // pointer to buffer containing message
  18.     UInt32    size;    // size of message in buffer
  19.     UInt16    offset;    // offset to next item in message
  20. };
  21. typedef struct msg_descriptor msg_descriptor_t;
  22.  
  23. Boolean IsFakeDNSLookup(msg_descriptor_t* md);
  24.  
  25. Boolean GetDName(msg_descriptor_t* md, Str255 outStr);
  26.  
  27. UInt8 IsFakeDialingName(Str255 inStr);
  28.  
  29. StringPtr CopyPStr(
  30.     StringPtr    inSourceString,
  31.     StringPtr    outDestString,
  32.     SInt16        inDestSize);
  33.  
  34. StringPtr AppendPStr(
  35.     Str255            ioBaseString,
  36.     StringPtr        inAppendString,
  37.     SInt16            inDestSize);
  38.  
  39. #endif